Skip to main content

Upload Files

AutomatR.SFTP.UploadFiles

The "Upload Files" activity in AutomatR is part of the SFTP activities package, facilitating the uploading of files to an SFTP server. This activity simplifies the process of transferring files to an SFTP server, providing automation capabilities for efficient file management.

Properties

NameDescription
Input
ClientProvides the connection for the SFTP session. It requires an SftpClient object.
OverwriteIf checked, the files will be overwritten on the server if they already exist. Boolean variables containing the overwrite preference.
Server PathSpecifies the server folder path on the SFTP server where the files will be uploaded. String variables containing the server path.
Source FilesSpecifies a list of files to be uploaded to the SFTP server. List variables containing the file paths.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before starting the activity. Useful for handling synchronization issues.

How to use:

  1. Drag and drop the "Upload Files" activity onto the workflow.
  2. Configure the properties by specifying the SFTP client, source files, server path, and overwrite preference.
  3. Optionally, configure the delay and customize the display name.
  4. Execute the workflow to upload the specified files to the SFTP server.

Example:

Consider an example where the "Upload Files" activity is used to upload multiple files to an SFTP server:

Upload Files:
Display Name: "Upload Documents"
Client: sftpClientObject
Source Files:
- "C:\Documents\File1.txt"
- "C:\Documents\File2.txt"
Server Path: "/Documents/"
Overwrite: true

In this example, the activity uploads "File1.txt" and "File2.txt" from the local machine to the "/Documents/" folder on the SFTP server. The sftpClientObject represents the connected SFTP client, and the overwrite option is set to true to replace existing files.